import qs from 'qs'
import axios from 'axios'

export function getSave(val) {
    console.log(val);
    return axios({
        url: `http://localhost:1111/classify/${val.id ? 'update' : 'save'}`,
        method: 'post',
        data: qs.stringify(val)
    })
}
//删除
export function deleteFn(ids) {
    return axios({
        url: 'http://localhost:1111/classify/delete',
        method: 'get',
        params: { id: ids }
    })
}